package com.yanqu.road.entity.activity.carptrip.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_carp_trip_pvp_data")
public class CarpTripPvPCellData extends DataObject {

    @FieldTypeAnnotation(select = true, update = true, desc = "活动ID")
    private int activityId;

    @FieldTypeAnnotation(desc = "层数", update = true)
    private int cellId;

    @FieldTypeAnnotation(desc = "血量")
    private String blood;

    @FieldTypeAnnotation(desc = "占坑玩家")
    private long userId;

    @FieldTypeAnnotation(desc = "占坑玩家")
    private UserBaseInfo userBaseInfo;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public int getCellId() {
        return cellId;
    }

    public void setCellId(int cellId) {
        if(this.cellId != cellId) {
            this.cellId = cellId;
            setUpdateOption();
        }
    }

    public String getBlood() {
        return blood;
    }

    public void setBlood(String blood) {
        if(!Objects.equals(this.blood, blood)) {
            this.blood = blood;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        this.userBaseInfo = userBaseInfo;
        setUpdateOption();
    }

}
